]> dgit.raspbian.org Git - gnome-shell.git/commit
status/nightLight: Use promise to initialize proxy
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 24 Jul 2022 18:12:54 +0000 (20:12 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Aug 2022 12:33:35 +0000 (12:33 +0000)
commit80e4ae7d7f996361b77f1e20d1553d3c2a7d1cc2
treee8121a8a79dce6be630e9f091413f93b5ee17ac6
parenta3dc9817f2bf49ccfab6888bccdeaee0ccdaf6b2
status/nightLight: Use promise to initialize proxy

There's no good reason for waiting for the proxy to be initialized
to connect signals. In fact, connecting the signal beforehand
ensures that the handler is in place when the proxy fetches the
properties, so we don't have to call the handler explicitly.

That in turn will allow us in a follow-up to rely on the signal
parameters to only process changed properties.

To achieve that, construct the proxy manually, and then initialize
it asynchronously in a Promise.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2391>
js/ui/status/nightLight.js